source /home/czy/ssd/bc-storage/cluster_IP.conf

for node in ${KAFKA_IPs[@]}; do echo "docker ps -a in $node"; ssh $node "docker ps -a"; done

for node in ${HOSTS_IPs[@]}; do echo "================ ssh to $node ================"; ssh $node "docker ps -a"; done

# cat fabric-sdk process
for node in ${FABRIC_SDK_IPs[@]}; do echo "================ ssh to $node ================"; ssh $node "ps -axu | grep fabric-sdk"; done

# cat fabric-sdk log
for node in ${FABRIC_SDK_IPs[@]}; do echo "================ ssh to $node ================"; ssh $node "cat deploy-bcs/fabric-sdk/fabric-sdk-bin/fabric-sdk*.log; echo """; done

# cat ceph status
org_id=0; for node in ${CEPH_IPs[@]}; do echo "================ ssh to $node ================"; ssh $node "docker exec ceph-demo-${org_id} zsh -c 'source ~/.zshrc; ceph -s' 2>/dev/null"; org_id=$(($org_id+1)); done
org_id=0; for node in ${CEPH_IPs[@]}; do echo "================ ssh to $node ================"; ssh $node "docker exec ceph-demo-${org_id} zsh -c 'source ~/.zshrc; ceph health' 2>/dev/null"; org_id=$(($org_id+1)); done

# cat redundancy process
org_id=0; for node in ${CEPH_IPs[@]}; do echo "================ ssh to $node ================"; ssh $node "ps -aux | grep redundancy"; org_id=$(($org_id+1)); done

# cat redundancy log
org_id=0; for node in ${CEPH_IPs[@]}; do echo "================ ssh to $node ================"; ssh $node "docker exec ceph-demo-${org_id} zsh -c 'source ~/.zshrc; cat ~/ssd/bc-storage/run-redundancy/redundancy.log' 2>/dev/null"; org_id=$(($org_id+1)); done